 // 随机16进制颜色
 function randomColor(){
    var str = '#'
    for(var i = 0 ; i < 6;i++){
    var num = parseInt(Math.random() * 17).toString(16)
        if(num === '10'){
            num = parseInt(Math.random() * 10)
            str += num
        }else{
            str += num
        }
    }
    return str
}

// 当前时间
function timer(){
    var date = new Date()
    var years = date.getFullYear()
    var month = date.getMonth()
    var days = date.getDate()
    var hours = date.getHours()
    var min = date.getMinutes()
    var sec = date.getSeconds()
    hours =  hours < 10 ? '0' + hours : hours
    min =  min < 10 ? '0' + min : min
    sec =  sec < 10 ? '0' + sec : sec
    return ' '+ years + '/' + month + '/' + days + ' ' + hours + ':' + min + ':' + sec
}